<?php

class Antz_Form_Components_LongTag extends Antz_Form_Component
{
    protected $tagname = 'p';
    protected $text = '';

    public function __construct($tagname, $text=''){
        $this->tagname = $tagname;
        $this->text = $text;
    }

    public function render(){
        $closeTag = explode(' ', $this->tagname);
        $closeTag = $closeTag[0];
        return '<'.$this->tagname.' '.$this->renderClasses().' id="'.$this->getId().'" '.$this->renderParameters().'>'."\n  "
            .$this->text."\n".'</'.$closeTag.'><!-- end'.$this->renderClasses().' -->';
    }

}
